class Solution(object):
    def convertToTitle(self, n):
        """
        :type n: int
        :rtype: str
        """
        s = ''
        while n > 0:
            s = chr((n - 1) % 26 + 65) + s
            n = (n - 1) // 26

        return s

s = Solution()
print(s.convertToTitle(1))
print(s.convertToTitle(28))
print(s.convertToTitle(701))
